/*------------------------------------------------------*/
/* im base define                                       */
/*                                                      */
/* cmimdef.h                                            */
/*                                                      */
/* Copyright (C) CyberNaut.com.cn                       */
/* All rights reserved                                  */
/*                                                      */
/* Author                                               */
/*    Jobs Chen (jobs.chen@cybernaut.com.cn)            */
/*                                                      */
/* History                                              */
/*    02/23/2006  Create                                */
/*    02/25/2006  Davis add default constructor         */
/*                                                      */
/*------------------------------------------------------*/

#ifndef __RT_IM_DEF_H__
#define __RT_IM_DEF_H__

#include "RtStdCpp.h"
/*
typedef enum {
	RT_SVRTYPE_NONE = 0,
	RT_SVRTYPE_INFO, 
	RT_SVRTYPE_IM, 
	RT_SVRTYPE_ACD, 
} RtServerType;

typedef enum
{
	RT_IID_IM_BASE = 0,		// IIMAPI interface
	RT_IID_GANG_API,		// IGangAPI interface
	RT_IID_CEM_API,			// ICemSessionAPI interface

// 	RT_IID_CEM_WEBAPI = 10,	// ICEMWebAPI interface
// 
// 	RT_IID_WEBTOUCH = 20,	// IWebTouch interface
} RT_IM_InterfaceID;

typedef enum
{
	RT_IM_PRODUCT_IM = 0,
	RT_IM_PRODUCT_WT = 1,
	RT_IM_PRODUCT_INS = 2
}RT_IM_PRODUCT;

typedef enum
{
	RT_IM_OS_WIN32 =0,
	RT_IM_OS_LINUX = 0x10,
	RT_IM_OS_MAC,
	RT_IM_OS_SOLARIS,
	RT_IM_OS_PC_JAVA =0x20,
	RT_IM_OS_SYMBIAN_J2ME = 0x30,
}RT_IM_OS;

*/

typedef enum
{
	RT_IM_STATUS_OFFLINE = 0,
	RT_IM_STATUS_ONLINE,
	RT_IM_STATUS_AVAILABLE,
	RT_IM_STATUS_BUSY,
	RT_IM_STATUS_HIDE,
	//: Racker add
	RT_IM_STATUS_AWAY,
	RT_IM_STATUS_PENDING,
	RT_IM_STATUS_ONCALL,
	//: Tony add
	RT_IM_STATUS_BLOCK = 100,

	RT_IM_STATUS_USERDEFINE = 0xff,
	RT_IM_STATUS_MOBILE_ID	= 0x80
}RT_IM_STATUS;

// invalid file handle
const DWORD RT_INVALID_FILE_HANDLE			= (DWORD)-1;
const DWORD RT_INVALID_FILE_PATH            = (DWORD)0;
/*
typedef enum
{
	RT_IM_LANG_EN = 0,
	RT_IM_LANGUE_CN,
	RT_IM_LALANGUE_CN_TRN
}RT_IM_LANGUAGE;

typedef enum
{
	RT_IM_MESSAGE_TYPE_CHAT = 0x00,
	RT_IM_MESSAGE_TYPE_TYPING = 0x01,
	RT_IM_MESSAGE_TYPE_OFFLINE = 0x10,
	RT_IM_MESSAGE_TYPE_TRACKING = 0xa0,
	RT_IM_MESSAGE_TYPE_COBROWSER = 0xa1,
	RT_IM_MESSAGE_TYPE_COBROWSER_COMMAND = 0xa2,
	RT_IM_MESSAGE_TYPE_ALERT = 0xa3,
	RT_IM_MESSAGE_TYPE_FAILED	= 0xb0,
	RT_IM_MESSAGE_TYPE_PDU = 0xc0,
	CM_IM_MESSAGE_TYPE_PNGPIC = 0xcd,
	CM_IM_MESSAGE_TYPE_JPGPIC = 0xce,
	RT_IM_MESSAGE_TYPE_SYSTEM = 0xe0,
	RT_IM_MESSAGE_TYPE_GANG = 0xf0,
	RT_IM_MESSAGE_TYPE_GANG_PIC = 0xf1,
}RT_IM_MESSAGE_TYPE;

typedef enum
{
	RT_IM_AUTH_TYPE_NORMAL = 0x00,
	RT_IM_AUTH_TYPE_DIGIT,
	RT_IM_AUTH_TYPE_CACHE,
	RT_IM_AUTH_TYPE_TICKET,
	RT_IM_AUTH_TYPE_TICKET_MD5,
	RT_IM_AUTH_TYPE_INTERNAL	= 0xa0
}RT_IM_AUTH_TYPE;

typedef enum
{
	RT_IM_LISTEN_TYPE_DATA_TCP = 0x01,
	RT_IM_LISTEN_TYPE_MEDIA_UDP = 0x02
}RT_IM_LISTEN_TYPE;

typedef enum
{
	RT_IM_MESSAGE_FLAG_NONE				=	0x00,
	RT_IM_MESSAGE_FLAG_SERVER_RECORD	=	(1<<0),
	RT_IM_MESSAGE_FLAG_FORCEBYSERVER	=	(1<<2)
}RT_IM_MESSAGE_FLAG;

typedef enum
{
	RT_IM_SHARE_INFO_NICKNAME,
	RT_IM_SHARE_INFO_IMAGE,
	RT_IM_SHARE_INFO_USERDEFIMG
}RT_IM_SHARE_INFO_TYPE;

typedef enum
{
	RT_IM_OPTION_SAVE_MESSAGE_IN_LOCAL	= 0x00,
	RT_IM_OPTION_GET_LOCAL_ADDRESS		= 0x01
}RT_IM_OPTION_TYPE;


typedef enum
{
	RT_SSO_LOGIN_TYPE_NONE,
	RT_SSO_LOGIN_TYPE_IM,
	RT_SSO_LOGIN_TYPE_WEBTOUCH,
	RT_SSO_LOGIN_TYPE_INS,
	RT_SSO_LOGIN_TYPE_ET,
} RT_SSO_LOGIN_TYPE;

const DWORD SSO_IM_ID		= 21;
const DWORD SSO_WEBTOUCH_ID	= 13;
const CRtString SSO_IM_NAME			= "im";
const CRtString SSO_WEBTOUCH_NAME	= "webtouch";


#ifndef RT_SUCCEEDED
#define RT_FAILED(rv) (rv != 0)
#define RT_SUCCEEDED(rv) (rv == 0)
#endif

//result define
const RtResult RT_IM_RESULT_SUCCESS = 	0;

const RtResult RT_IM_RESULT_FAILED				= 0x100;
const RtResult RT_IM_RESULT_WRONG_ACCOUNT		= (RT_IM_RESULT_FAILED + 1);
const RtResult RT_IM_RESULT_WRONG_PASSWD		= (RT_IM_RESULT_FAILED + 2);
const RtResult RT_IM_RESULT_SYSTEM_NOT_READY	= (RT_IM_RESULT_FAILED + 3);
const RtResult RT_IM_RESULT_SYSTEM_STOP		= (RT_IM_RESULT_FAILED + 4);
const RtResult RT_IM_RESULT_SYSTEM_BUSY		= (RT_IM_RESULT_FAILED + 5);
const RtResult RT_IM_RESULT_SYSTEM_ERROR		= (RT_IM_RESULT_FAILED + 6);
const RtResult RT_IM_RESULT_NETWORK_ERROR		= (RT_IM_RESULT_FAILED + 7);
const RtResult RT_IM_RESULT_KICKOFF_BYSVR		= (RT_IM_RESULT_FAILED + 8);
const RtResult RT_IM_RESULT_NEW_VERSION		= (RT_IM_RESULT_FAILED + 9);
const RtResult RT_IM_RESULT_SERVER_UNAVAILABLE	= (RT_IM_RESULT_FAILED + 10);
const RtResult	RT_IM_RESULT_WRONG_PROTOCOL		= (RT_IM_RESULT_FAILED + 11);
const RtResult RT_IM_RESULT_WRONG_STATUS		= (RT_IM_RESULT_FAILED + 12);

const RtResult	RT_IM_RESULT_EMPTY_SERVER		= (RT_IM_RESULT_FAILED + 13);
const RtResult	RT_IM_RESULT_EMPTY_ACCONT		= (RT_IM_RESULT_FAILED + 14);
const RtResult RT_IM_RESULT_EMPTY_PASSWD		= (RT_IM_RESULT_FAILED + 15);
const RtResult RT_IM_RESULT_SAME_PASSWD		= (RT_IM_RESULT_FAILED + 16);
const RtResult RT_IM_RESULT_WRONG_PARAM		= (RT_IM_RESULT_FAILED + 17);
const RtResult RT_IM_RESULT_SAME_PARAM			= (RT_IM_RESULT_FAILED + 18);
const RtResult	RT_IM_RESULT_USER_NOT_EXIST		= (RT_IM_RESULT_FAILED + 19);
const RtResult	RT_IM_RESULT_SUBSCRIBE_PENDING	= (RT_IM_RESULT_FAILED + 20);
const RtResult RT_IM_RESULT_SUBSCRIBE_DENY		= (RT_IM_RESULT_FAILED + 21);
const RtResult RT_IM_RESULT_USER_EXIST			= (RT_IM_RESULT_FAILED + 22);

const RtResult RT_IM_RESULT_USER_DENY		= (RT_IM_RESULT_FAILED + 23);
const RtResult RT_IM_RESULT_USER_CANCEL		= (RT_IM_RESULT_FAILED + 24);

const RtResult RT_IM_RESULT_NO_SSO			= (RT_IM_RESULT_FAILED + 25);
const RtResult RT_IM_RESULT_SSO_ERROR		= (RT_IM_RESULT_FAILED + 26);
const RtResult RT_IM_RESULT_SSO_CONNECT_ERR	= (RT_IM_RESULT_FAILED + 27);
const RtResult RT_IM_RESULT_SSO_PASSWD_ERR	= (RT_IM_RESULT_FAILED + 28);
const RtResult RT_IM_RESULT_TICKET_ERROR	= (RT_IM_RESULT_FAILED + 29);
const RtResult RT_IM_RESULT_GANG_FULL		= (RT_IM_RESULT_FAILED + 30);

const RtResult RT_IM_RESULT_NO_IMPLEMENT		= (RT_IM_RESULT_FAILED + 100);
const RtResult RT_IM_RESULT_FILE_NOT_EXIST		= (RT_IM_RESULT_FAILED + 101);

struct CCmClientVersion
{
	RT_IM_PRODUCT nProduct;
	RT_IM_OS nOSType;
	RT_IM_LANGUAGE	nLanguage;
	WORD major;
	WORD middle;
	WORD minor;

	CCmClientVersion()
	{
		this->nProduct = RT_IM_PRODUCT_IM;
		this->nOSType = RT_IM_OS_WIN32;
		this->nLanguage = RT_IM_LANG_EN;
		this->major = 0;
		this->middle = 0;
		this->minor = 0;
	}
	CCmClientVersion(RT_IM_PRODUCT nProduct,
					RT_IM_OS nOSType,
					RT_IM_LANGUAGE nLanguage,
					WORD major,
					WORD middle,
					WORD minor)
	{
		this->nProduct = nProduct;
		this->nOSType = nOSType;
		this->nLanguage = nLanguage;
		this->major = major;
		this->middle = middle;
		this->minor = minor;
	}
	~CCmClientVersion()
	{
	}
};
*/
/*
 *	to support different domain user, whole user should be in format as domain/usernme,
 *  but we also should support no domain user, 
 */

struct CCmUserName
{
	CRtString	strDomainName;//can be null; such as hp.cybernaut.com.cn
	CRtString	strUserName;//
	CRtString	strWholeName;
	CCmUserName()
	{
	}
	CCmUserName(const CRtString&  userName)
	{
		this->strUserName = this->strWholeName = userName;
	}

	CCmUserName(const CRtString& userName,
				const CRtString& domainName)
	{
		SetUserName(userName, domainName);
	}

	void SetUserName(const CRtString& strUserName,
				const CRtString& strDomainName)
	{
		this->strDomainName = strDomainName;
		this->strUserName = strUserName;
		if (strDomainName.c_str() && !strDomainName.empty())
		{
			strWholeName = strDomainName + "/" + strUserName;
		}
		else
			strWholeName = strUserName;
	}
	~CCmUserName()
	{
	}

//: add by Racker
//: 
	CCmUserName( const CCmUserName &username )
	{
		AssignValue( username );
	}
	CCmUserName &operator=( const CCmUserName &username )
	{
		return AssignValue( username );
	}
private:
	CCmUserName &AssignValue( const CCmUserName &username)
	{
		if ( &username == this )
			return *this;
		if ( username.strDomainName.length() )
			this->strDomainName = username.strDomainName;
		else
			this->strDomainName = "";
		if (  username.strUserName.length() )
			this->strUserName = username.strUserName;
		else
			this->strUserName = "";
		if (  username.strWholeName.length())
			this->strWholeName = username.strWholeName;
		else
			this->strWholeName = "";
		return *this;
	}
};
typedef CCmUserName CRtUserName;

struct CCmUserID
{
	DWORD dwDomainID;
	DWORD dwUserID;

	CCmUserID()
	{
		this->dwDomainID = 0;
		this->dwUserID = 0;
	}
	CCmUserID(DWORD dwUserID,
				DWORD dwDomainID = 0)
	{
		this->dwDomainID = dwDomainID;
		this->dwUserID = dwUserID;
	}
	/* Copy Constructor & operator=. Added by Webb 10/13/2006. */
	CCmUserID(const CCmUserID& rhs)
		: dwDomainID(rhs.dwDomainID)
		, dwUserID(rhs.dwUserID)
	{
	}
	CCmUserID& operator=(const CCmUserID& rhs)
	{
		if (this==&rhs) 
			return *this;
		this->dwDomainID = rhs.dwDomainID;
		this->dwUserID = rhs.dwUserID;
		return *this;
	}
	~CCmUserID()
	{
	}
	BOOL operator == (const CCmUserID& userID) const
	{
		if (this->dwDomainID == userID.dwDomainID &&
			this->dwUserID == userID.dwUserID)
			return TRUE;
		else
			return FALSE;
	}
	bool operator <(const CCmUserID& userID) const
	{
#if 1 // webb.zheng : fix std::map::find() bug. 
		if (this->dwDomainID<userID.dwDomainID 
			|| this->dwDomainID==userID.dwDomainID && this->dwUserID<userID.dwUserID)

			return true;
		else
			return false;
#else
		if(this->dwUserID < userID.dwUserID || 
		   this->dwDomainID < userID.dwDomainID)
			return true;
		else
			return false;
#endif
	}
};

typedef CCmUserID CRtUserID	;

struct CCmUserInfo
{
	CCmUserID userID;
	CCmUserName	username;
	CRtString realName;
	BYTE age;
	BOOL bMan;
	BYTE imageID;
	BYTE countryID;
	BYTE provinceID;
	CRtString city;
	CRtString address;
	CRtString	zipcode;
	CRtString corporation;
	BYTE authType;//0: don't need auth, 1: need auth;2: don't allow subscribe
	DWORD dwCapacity;
	CRtString nickName;
	CRtString eMailAddress;
	CRtString idiograph;
	CRtString mobilePhone;
	CRtString homePhone;
	CRtString corpPhone;
	CRtString refStr1;
	CRtString refStr2;
	CRtString refStr3;
	CRtString refStr4;
	CRtString refStr5;
	DWORD	  refNum1;
	DWORD	  refNum2;
	DWORD	  refNum3;

	CCmUserInfo()
	{
		age = 0;
		bMan = TRUE;
		imageID = 0;
		countryID = 0;
		provinceID = 0;
		authType = 0;
		dwCapacity = 0;

		refNum1 = 0;
		refNum2 = 0;
		refNum3 = 0;
	}
};

/*
typedef CCmUserInfo CRtUserInfo;

struct CCmBuddyInfo
{
	CCmUserID userID;
	CCmUserName userName;
	BYTE imageID;
	RT_IM_STATUS nStatus;
	CRtString	strStatusDecription;
	CRtString	nickName;
	CRtString	groupname;
	BYTE		invisible;//0:visible, 1: no-visible, 2: always no-visible

	CCmBuddyInfo()
	{
		this->imageID = 0;
		this->nStatus = RT_IM_STATUS_OFFLINE;
		invisible = 0;
	}
	CCmBuddyInfo(const CCmUserID& userID,
				BYTE imageID,
				RT_IM_STATUS nStatus,
				const CRtString& strStatusDecription,
				const CRtString& nickName,
				const CRtString&  groupname,
				BYTE	invisible)
	{
		this->userID = userID;
		this->imageID = imageID;
		this->nStatus = nStatus;
		this->strStatusDecription = strStatusDecription;
		this->nickName = nickName;
		this->groupname = groupname;
		this->invisible = invisible;
	}
	~CCmBuddyInfo()
	{
	}
};

typedef CCmBuddyInfo CRtBuddyInfo;

struct CCmBuddyDetailInfo
{
	CCmUserID	buddyID;
	CRtString	name;
	CRtString	homePhone;	
	CRtString	mobilePhone;
	CRtString	corpPhone;
	CRtString	corporation;
	CRtString	email;
	CRtString	address;
	CRtString	zipcode;
	CRtString	memo;
	CRtString 	refStr1;
	CRtString 	refStr2;
	CRtString 	refStr3;
	CRtString 	refStr4;
	CRtString 	refStr5;
	DWORD	  	refNum1;
	DWORD	  	refNum2;
	DWORD	  	refNum3;
};

typedef CCmBuddyDetailInfo CRtBuddyDetailInfo;

struct CCmNoIMBuddyInfo
{
	CRtString	name;
	CRtString	groupName;
	CRtString	homePhone;	
	CRtString	mobilePhone;
	CRtString	corpPhone;
	CRtString	corporation;
	CRtString	email;
	CRtString	address;
	CRtString	zipcode;
	CRtString	im_account;
	CRtString	memo;
	CRtString 	refStr1;
	CRtString 	refStr2;
	CRtString 	refStr3;
	CRtString 	refStr4;
	CRtString 	refStr5;
	DWORD	  	refNum1;
	DWORD	  	refNum2;
	DWORD	  	refNum3;
};

typedef CCmNoIMBuddyInfo CRtNoIMBuddyInfo;

struct CCmUserMachineInfo
{
	typedef enum
	{
		RT_CPU_TYPE_INTEL_SINGLE,
		RT_CPU_TYPE_INTEL_DOUBLE,
		RT_CPU_TYPE_AMD_SINGLE,
		RT_CPU_TYPE_AMD_DOUBLE,
		RT_CPU_TYPE_MOBILE,
		RT_CPU_TYPE_OTHER	=0xff
	}RT_CPU_TYPE;
	typedef enum
	{
		RT_OS_TYPE_WIN32_1,//95/98/ME
		RT_OS_TYPE_WIN32_2,//2K/XP/NT etc.
		RT_OS_TYPE_LINUX,
		RT_OS_TYPE_MOBLE,
		RT_OS_TYPE_OTHER=0xff
	}RT_OS_TYPE;

	CCmUserID userID;
	DWORD dwIP;
	WORD	nPort;
	RT_CPU_TYPE	cpuType;
	DWORD	dwCPUFrequency;
	DWORD	dwMemory;
	DWORD	dwNetworkSpeed;
	RT_OS_TYPE	osType;

	CCmUserMachineInfo()
	{
	}
	CCmUserMachineInfo(const CCmUserID& userID,
						DWORD dwIP,
						WORD nPort,
						RT_CPU_TYPE cpuType,
						DWORD dwCPUFrequency,
						DWORD dwMemory,
						DWORD dwNetworkSpeed,
						RT_OS_TYPE osType)
	{
		this->userID = userID;
		this->dwIP = dwIP;
		this->nPort = nPort;
		this->cpuType = cpuType;
		this->dwCPUFrequency = dwCPUFrequency;
		this->dwMemory = dwMemory;
		this->dwNetworkSpeed = dwNetworkSpeed;
		this->osType = osType;
	}
	~CCmUserMachineInfo()
	{
	}
};

typedef CCmUserMachineInfo CRtUserMachineInfo;

typedef enum
{
	CM_IM_NULL_TYPE = 0,

	INS_IM_USER_INFO = 10,
} CM_IM_USERINFO_TYPE;

#ifdef WIN32
struct CCmUserInfoEx
{
	typedef enum
	{
		OWNER_NONE = 0,
		OWNER_BASE = (1<<0),
		OWNER_DETAIL = (1<<1),
	} CM_OWNER_FLAG;

	DWORD	iType;			// type, define see above
	DWORD	dwParam;		// param, reserve for the future

	BYTE	bOwnerFlag;
	CCmUserInfo* pBaseInfo;	// base im user info pointer

	void*	pDetailInfo;	// detail user info pointer

	CCmUserInfoEx()
	{
		iType = CM_IM_NULL_TYPE;
		dwParam = 0;

		pBaseInfo = NULL;
		pDetailInfo = NULL;
		bOwnerFlag = OWNER_NONE;
	}

	~CCmUserInfoEx()
	{
		if ((bOwnerFlag & OWNER_BASE) && pBaseInfo)
		{
			bOwnerFlag &= ~OWNER_BASE;

			delete pBaseInfo;
			pBaseInfo = NULL;
		}

		if ((bOwnerFlag & OWNER_DETAIL) && pDetailInfo)
		{
			bOwnerFlag &= ~OWNER_DETAIL;

			delete pDetailInfo;
			pDetailInfo = NULL;
		}
	}

	void SetBaseInfo(CCmUserInfo* pBase, BOOL bOwner = FALSE)
	{
		pBaseInfo = pBase;

		if (bOwner)
		{
			bOwnerFlag |= OWNER_BASE;
		}
	}

	void SetDetailInfo(void* pDetail, BOOL bOwner = FALSE)
	{
		iType = INS_IM_USER_INFO;
		pDetailInfo = pDetail;

		if (bOwner)
		{
			bOwnerFlag |= OWNER_DETAIL;
		}
	}
};
typedef CCmUserInfoEx CRtUserInfoEx;
#endif

#ifndef SIMPLE_USER_INFO
#define SIMPLE_USER_INFO
struct CSimpleUserInfo
{
	CCmUserID	userID;
	CRtString	userName;
	CRtString	userDisplayName;
	CRtString	email;
	RT_IM_STATUS	nStatus;
	CRtString refStr1; // Attendtime of gang attendee. Added by Webb Zheng.
};
#endif	// SIMPLE_USER_INFO

typedef enum
{
	IMGANG_ACCEPT_ALL = 0,
	IMGANG_NEED_AUTHORIZE = 1,
	IMGANG_DENY_ALL = 2
}IMGANG_AUTH;

typedef enum
{
	GANG_STATUS_INIT = 0,
	GANG_STATUS_NORMAL = 1,
	GANG_STATUS_LOCKED = 2,
	GANG_STATUS_DELETED = 3
}GANG_STATUS_TYPE;

struct CRtGangID
{
	DWORD dwDomainID;
	DWORD dwGangID;

	CRtGangID()
	{
		this->dwDomainID = 0;
		this->dwGangID = 0;
	}
	CRtGangID(DWORD dwGangID,
				DWORD dwDomainID = 0)
	{
		this->dwDomainID = dwDomainID;
		this->dwGangID = dwGangID;
	}
	~CRtGangID()
	{
	}
	BOOL operator == (const CRtGangID& userID) const
	{
		if (this->dwDomainID == userID.dwDomainID &&
			this->dwGangID == userID.dwGangID)
			return TRUE;
		else
			return FALSE;
	}
};


class CRtGangInfo
{
public:
	CRtGangInfo()
	{
		m_GangStatus = GANG_STATUS_INIT;
		m_dwRef1 = m_dwRef2 = 0;
	}
	CRtGangInfo(
			const CRtUserID& CreatorID,
			const CRtString& strCreatorName,
			const CRtGangID& GangID,
			const CRtString& strGangName,
			const CRtString& strDescription,
			const CRtString& strBullitin,
			const CRtString& strCreateTime,
			BOOL bIsPublic,
			IMGANG_AUTH Authorization,
			WORD wMaxAdmin,
			DWORD dwMaxAttendee,
			DWORD dwMaxOfflineMsgNum,
			DWORD dwRef1 = 0,
			DWORD dwRef2 = 0,
			const CRtString& strRef3 = NULL,
			const CRtString& strRef4 = NULL)
	{
		m_GangID = GangID;
		m_strCreatorName = strCreatorName;
		m_CreatorID = CreatorID;
		m_strGangName = strGangName;
		m_strDescription = strDescription;
		m_strBullitin = strBullitin;
		m_strCreateTime = strCreateTime;
		m_bIsPublic = bIsPublic;
		m_Authorization = Authorization;
		m_wMaxAdmin = wMaxAdmin;
		m_dwMaxAttendee = dwMaxAttendee;
		m_dwMaxOfflineMsgNum = dwMaxOfflineMsgNum;
		m_GangStatus = GANG_STATUS_INIT;
		m_dwRef1 = dwRef1;
		m_dwRef2 = dwRef2;
		m_strRef3 = strRef3;
		m_strRef4 = strRef4;
	}

	void operator =(const CRtGangInfo& IMGangInfo)
	{
		m_GangID = IMGangInfo.m_GangID;                               
		m_CreatorID = IMGangInfo.m_CreatorID;
		m_strCreatorName = IMGangInfo.m_strCreatorName;
		m_strGangName = IMGangInfo.m_strGangName;                     
		m_strDescription = IMGangInfo.m_strDescription;                 
		m_strBullitin = IMGangInfo.m_strBullitin;                       
		m_strCreateTime = IMGangInfo.m_strCreateTime;
		m_bIsPublic = IMGangInfo.m_bIsPublic;                           
		m_Authorization = IMGangInfo.m_Authorization;               
		m_wMaxAdmin = IMGangInfo.m_wMaxAdmin;                           
		m_dwMaxAttendee = IMGangInfo.m_dwMaxAttendee;
		m_dwMaxOfflineMsgNum = IMGangInfo.m_dwMaxOfflineMsgNum;
		m_GangStatus = IMGangInfo.m_GangStatus;
		m_AdminList = IMGangInfo.m_AdminList;                           
		m_dwRef1 = IMGangInfo.m_dwRef1;
		m_dwRef2 = IMGangInfo.m_dwRef2;
		m_strRef3 = IMGangInfo.m_strRef3;
		m_strRef4 = IMGangInfo.m_strRef4;
	}

public:
	CRtGangID		m_GangID;
	CRtString		m_strCreatorName;
	CRtUserID		m_CreatorID;
	CRtString		m_strGangName;
	CRtString		m_strDescription;
	CRtString		m_strBullitin;
	CRtString		m_strCreateTime;
	BOOL			m_bIsPublic;
	IMGANG_AUTH		m_Authorization;
	WORD			m_wMaxAdmin;
	DWORD			m_dwMaxAttendee;	
	DWORD			m_dwMaxOfflineMsgNum;
	GANG_STATUS_TYPE	m_GangStatus;
	std::list<CRtUserID>	m_AdminList;

	DWORD m_dwRef1;
	DWORD m_dwRef2;
	CRtString m_strRef3;
	CRtString m_strRef4;
};

struct CBroadCastMsg
{
	CRtString	strCreateTime;
	CRtString	strMsgTitle;
	CRtString	strMsgContent;
};

struct CSettingMessageCategory
{
	DWORD	dwCategoryID;
	DWORD	dwLevel;
	DWORD dwParentID;
	CRtString	strName;
	CRtString strDescrption;
};

struct CSettingMessage
{
	DWORD dwCategoryID;	
	CRtString name;
	CRtString content;
};
*/
#endif //!__RT_IM_DEF_H__

